package com.woniu.liuzhougov.relatedinformation.utils;

import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;

/**
 * @Description: desc
 * @author: Chris
 * @createDate: 2019/4/24 0024
 * @version: 1.0
 */
public class RelatedInformationInitMVC {

    public static void initMVC(ViewControllerRegistry registry){
        goodEnterpriseInit(registry);
        commerceInit(registry);
        cityInit(registry);
        contactInformationInit(registry);
    }

    public static void goodEnterpriseInit(ViewControllerRegistry registry){
        registry.addViewController("/good_enterprise_index.html").setViewName("good_enterprise_index");
        registry.addViewController("/good_enterprise_index_add.html").setViewName("good_enterprise_index_add");
        registry.addViewController("/good_enterprise_index_update.html").setViewName("good_enterprise_index_update");
        registry.addViewController("/file_manage_upload_good_enterprise.html").setViewName("file_manage_upload_good_enterprise");
    }

    public static void commerceInit(ViewControllerRegistry registry){
        registry.addViewController("/commerce_index.html").setViewName("commerce_index");
        registry.addViewController("/commerce_index_add.html").setViewName("commerce_index_add");
        registry.addViewController("/commerce_index_update.html").setViewName("commerce_index_update");
        registry.addViewController("/file_manage_upload_commerce.html").setViewName("file_manage_upload_commerce");

    }

    public static void cityInit(ViewControllerRegistry registry){
        registry.addViewController("/city_index.html").setViewName("city_index");
        registry.addViewController("/city_index_add.html").setViewName("city_index_add");
        registry.addViewController("/city_index_update.html").setViewName("city_index_update");
        registry.addViewController("/file_manage_upload_city.html").setViewName("file_manage_upload_city");
    }

    public static void contactInformationInit(ViewControllerRegistry registry){
        registry.addViewController("/contact_information_index.html").setViewName("contact_information_index");
        registry.addViewController("/contact_information_index_add.html").setViewName("contact_information_index_add");
        registry.addViewController("/contact_information_index_update.html").setViewName("contact_information_index_update");
        registry.addViewController("/file_manage_upload_contact_information.html").setViewName("file_manage_upload_contact_information");
    }
}
